package com.xand.bt.terminal.common.util;

import java.text.DecimalFormat;

public class NumberHelper {

	public static String formatLong(long number, long division, int numDecimals) {
		
		double n = (double)number / (double)division;
		
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < numDecimals; i++) {
			sb.append("0");
		}
		
		DecimalFormat format = new DecimalFormat("0." + sb.toString());
		
		String ret = format.format(n);
		
		return ret;
	}
	
}
